package cn.edu.seu.ssny.service.impl;

import cn.edu.seu.ssny.dao.IStatisticsPowercostRateConfigDao;
import cn.edu.seu.ssny.dao.support.IBaseDao;
import cn.edu.seu.ssny.entity.Device;
import cn.edu.seu.ssny.entity.StatisticsPowercostRateConfig;
import cn.edu.seu.ssny.entity.StatisticsPowercostRateType;
import cn.edu.seu.ssny.service.IStatisticsPowercostRateConfigService;
import cn.edu.seu.ssny.service.support.impl.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StatisticsPowercostRateConfigServiceImpl extends BaseServiceImpl<StatisticsPowercostRateConfig, Integer> implements IStatisticsPowercostRateConfigService {
    @Autowired
    private IStatisticsPowercostRateConfigDao statisticsPowercostRateConfigDao;

    @Override
    public IBaseDao<StatisticsPowercostRateConfig, Integer> getBaseDao() {
        return statisticsPowercostRateConfigDao;
    }

    @Override
    public List<StatisticsPowercostRateConfig> findStatisticsPowercostRateConfigsByStatisticsPowercostRateType(StatisticsPowercostRateType statisticsPowercostRateType) {
        return statisticsPowercostRateConfigDao.findStatisticsPowercostRateConfigsByStatisticsPowercostRateType(statisticsPowercostRateType);
    }

    @Override
    public StatisticsPowercostRateConfig findByStatisticsPowercostRateTypeAndDevice(StatisticsPowercostRateType statisticsPowercostRateType, Device device) {
        return statisticsPowercostRateConfigDao.findStatisticsPowercostRateConfigByStatisticsPowercostRateTypeAndDevice(statisticsPowercostRateType, device);
    }
}
